﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GraphPlotting
{
    
    public partial class Form1 : Form
    {
        private static int graphNum;
        private static string selectedData;
        private static string selectedDataTwo;
        private static int selectedDataIndex;
        private static int selectedDataTwoIndex;
        private static int yearStart = 1977;
        private static int yearEnd = 2013;

        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            PlotDisplay plot = new PlotDisplay();
            plot.Show();
        }

        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedData = comboBox3.Text;
            selectedDataIndex = comboBox3.SelectedIndex;
        }

        private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedDataTwo = comboBox4.Text;
            selectedDataTwoIndex = comboBox4.SelectedIndex;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            graphNum = 1;
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            graphNum = 2;
            if(comboBox4.Enabled == false)
            {
                comboBox4.Enabled = true;
            }
            else if (comboBox4.Enabled == true)
            {
                comboBox4.Enabled = false;
            }
            
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            yearStart = (int)numericUpDown1.Value;
        }

        private void numericUpDown3_ValueChanged(object sender, EventArgs e)
        {
            yearEnd = (int)numericUpDown3.Value;
        }

        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        #region GETTERS

        public static string getSelectedOne()
        {
            return selectedData;
        }

        public static string getSelectedTwo()
        {
            return selectedDataTwo;
        }

        public static int getSelectedOneIndex()
        {
            return selectedDataIndex;
        }

        public static int getSelectedTwoIndex()
        {
            return selectedDataTwoIndex;
        }

        public static int getGraphNum()
        {
            return graphNum;
        }

        public static int getYearStart()
        {
            return yearStart;
        }

        public static int getYearEnd()
        {
            return yearEnd;
        }

        #endregion

       
    }
}
